package com.xdap.materialselect.controller;

import com.definesys.mpaas.common.http.Response;
import com.xdap.materialselect.entity.dto.ReportQueryDto;
import com.xdap.materialselect.service.MaterialSelectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * @Description:
 * @Auther:huhanrui
 * @Date:2025/4/23 17:10
 */
@RestController
@RequestMapping("/custom/materialSelect")
public class MaterialSelectController {

    @Autowired
    private MaterialSelectService materialSelectService;

    /**
     * 工作台表头接口
     */
    @PostMapping("/getReport/header")
    public Response getReportHeader(@RequestBody ReportQueryDto reportQueryDto) {
        return Response.ok().setData(materialSelectService.getReportHeader(reportQueryDto));
    }

    /**
     * 工作台数据接口
     */
    @PostMapping("/getReport/data")
    public Response getReportData(@RequestBody ReportQueryDto reportQueryDto) {
        return materialSelectService.getReportData(reportQueryDto);
    }

    /**
     * 批量操作-分类标签
     */
    @PostMapping("/addTypeTag")
    public Response addTypeTag(@RequestBody ReportQueryDto reportQueryDto) {
        return materialSelectService.addTypeTag(reportQueryDto);
    }

    /**
     * 发起处置单
     */
    @PostMapping("/genHandleData")
    public Response genHandleData(@RequestBody ReportQueryDto reportQueryDto) {
        return materialSelectService.genHandleData(reportQueryDto);
    }

}
